/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// UserInfo object for NHibernate mapped table 'UserInfo'.
	/// </summary>
	[Serializable]
    public partial class UserInfo : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected string _username;
		protected string _firstname;
		protected string _lastname;
		protected string _password;
		protected bool _showprofile;
	    protected string _netflixid;
        protected UserStatusTypes.Status _status;
		protected ShareMovies _sharemovies;
		protected DateTime _dateadded;
		protected DateTime _lastmodifiedby;
		protected string _emailaddress;
        protected IList<ServiceSubscriptionHistory> _servicesubscriptionhistory;
        protected IList<ServiceSubscriptions> _servicesubscriptions;
        protected IList<NetflixTokenStore> _netflixtokenstore;
		protected IList<Friends> _friends;
		protected IList<Movie> _movie;
		protected IList<UserCollections> _usercollections;
		protected IList<UserMovies> _usermovies;
        protected IList<UserVerification> _userverification;
		#endregion
		#region Constructors
			
		public UserInfo() {}

        public UserInfo(long id, string username, string firstname, string lastname, string password, bool showprofile, DateTime dateadded, DateTime lastmodifiedby, string emailaddress, UserStatusTypes.Status status) 
		{
            _id = id;
			this._username= username;
			this._firstname= firstname;
			this._lastname= lastname;
			this._password= password;
			this._showprofile= showprofile;
			this._dateadded= dateadded;
			this._lastmodifiedby= lastmodifiedby;
			this._emailaddress= emailaddress;
            this._status = status;
		}

		public UserInfo(string username, string password)
		{
			this._username= username;
			this._password= password;
		}
		
		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual string UserName
		{
			get { return _username; }
			set {_username= value; }
		}
		public  virtual string FirstName
		{
			get { return _firstname; }
			set {_firstname= value; }
		}
		public  virtual string LastName
		{
			get { return _lastname; }
			set {_lastname= value; }
		}
		public  virtual string Password
		{
			get { return _password; }
			set {_password= value; }
		}
		public  virtual bool ShowProfile
		{
			get { return _showprofile; }
			set {_showprofile= value; }
		}
        public virtual string NetflixId
        {
            get { return _netflixid; }
            set { _netflixid = value; }
        }
		public  virtual ShareMovies ShareMovies
		{
			get { return _sharemovies; }
			set {_sharemovies= value; }
		}
		public  virtual DateTime DateAdded
		{
			get { return _dateadded; }
			set {_dateadded= value; }
		}
		public  virtual DateTime LastModifiedBy
		{
			get { return _lastmodifiedby; }
			set {_lastmodifiedby= value; }
		}
		public  virtual string EmailAddress
		{
			get { return _emailaddress; }
			set {_emailaddress= value; }
		}
		public  virtual IList<Friends> Friends
		{
			get { return _friends; }
			set {_friends= value; }
		}
		public  virtual IList<Movie> Movie
		{
			get { return _movie; }
			set {_movie= value; }
		}
		public  virtual IList<UserCollections> UserCollections
		{
			get { return _usercollections; }
			set {_usercollections= value; }
		}
		public  virtual IList<UserMovies> UserMovies
		{
			get { return _usermovies; }
			set {_usermovies= value; }
		}
        public virtual UserStatusTypes.Status Status
        {
            get { return _status; }
            set { _status = value; }
        }
        public virtual IList<UserVerification> UserVerification
        {
            get { return _userverification; }
            set { _userverification = value; }
        }
        public virtual IList<NetflixTokenStore> NetflixTokenStore
        {
            get { return _netflixtokenstore; }
            set { _netflixtokenstore = value; }
        }
        public virtual IList<ServiceSubscriptionHistory> ServiceSubscriptionHistory
        {
            get { return _servicesubscriptionhistory; }
            set { _servicesubscriptionhistory = value; }
        }
        public virtual IList<ServiceSubscriptions> ServiceSubscriptions
        {
            get { return _servicesubscriptions; }
            set { _servicesubscriptions = value; }
        }

	    public virtual bool IsAdmin { get; set; }
        public virtual bool AllowToViewQueue { get; set; }
        public virtual string Avatar { get; set; }
	    public virtual DateTime LoggedInDate { get; set; }
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			UserInfo castObj = (UserInfo)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
